-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Use java 9 ALPN if available #3555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
|
okay to test |
|
This is related to #3401 in some ways, because it revamps how we handle Providers. |
| */ | ||
| static boolean isNettyJava9AlpnAvailable() { | ||
| try { | ||
| Class.forName("io.netty.handler.ssl.Java9SslEngine"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't tend to do this sort of thing. We instead just upgrade to the netty that supports the feature we need.
| } | ||
| }); | ||
| getApplicationProtocol.invoke(engine); | ||
| } catch (Throwable t) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we just catch Exception, or similar? I'd rather not catch every Error and throw it away, as it can hide legitimate problems.
* assume bundled Netty version supports JDK ALPN
|
okay to test |
|
Thank you for your pull request. Before we can look at your contribution, we need to ensure all contributors are covered by a Contributor License Agreement. After the following items are addressed, please respond with a new comment here, and the automated system will re-verify.
Regards, |
|
CLA signed |
|
Thank you! |
Netty
4.1.16supports Java 9 ALPN, gRPC should take advantage of that to ease deployment (especially on platforms without tcnative and/or openssl).This PR determines whether Java 9 ALPN and Netty 4.1.16 is available and enables Netty Java 9 ALPN.